package com.xmy.cultivate.feign;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xmy.cultivate.entity.SchoolQuarter;
import com.xmy.cultivate.entity.StudentAccount;
import com.xmy.cultivate.entity.response.AiSitePc;
import com.xmy.cultivate.entity.response.PassRade;
import com.xmy.cultivate.entity.response.PassRadeDetail;
import com.xmy.cultivate.respons.EduTask;
import com.xmy.cultivate.respons.PlanShutNum;
import com.xmy.cultivate.respons.ResStudentClassType;
import com.xmy.cultivate.respons.StudentClassType;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@FeignClient(value = "study-outside")
public interface IPlanFeignClient {

    /**
     * @param
     * @return
     */
    @GetMapping("/api/outside/studentAccount/test")
    //@RequestMapping(value="/api/outside/studentAccount/test",method=RequestMethod.GET)
    public String test(@RequestParam("name") String name);


    /**
     * 发送签到
     *
     * @param body
     * @return
     */
    @RequestMapping("/api/wecharTemp/sendSignIn")
    public String sendSignIn(@RequestBody String body);

    @RequestMapping(value = "/api/outside/chaPlan/test", method = RequestMethod.GET)
    public String Test(@RequestParam Map<String, Object> map);

    @RequestMapping(value = "/api/outside/chaPlan/getPlanShutNum", method = RequestMethod.POST)
    public Map<String, Object> getPlanShutNum(@RequestBody PlanShutNum planShutNum);

    @RequestMapping(value = "/api/outside/chaPlan/getPlanShutNumDetail", method = RequestMethod.POST)
    public Map<String, Object> getPlanShutNumDetail(@RequestBody PlanShutNum planShutNum);

    @RequestMapping(value = "/api/outside/chaPlan/getGoUpData", method = RequestMethod.POST)
    public Map<String, Object> getGoUpData(@RequestBody PlanShutNum planShutNum);

    @PostMapping("/api/outside/studentAccount/updateClassType")
    public String updateClassType(@RequestBody ResStudentClassType studentClassType);

    @PostMapping("/api/outside/chaPlan/updateStudentClassType")
    public boolean updateStudentClassType(@RequestBody ResStudentClassType studentClassType);

    @RequestMapping(value = "/api/outside/chaPlan/getMinimumTaskProgressRate", method = RequestMethod.POST)
    public Map<String, Object> getMinimumTaskProgressRate(@RequestBody PlanShutNum planShutNum);

    @RequestMapping(value = "/api/outside/chaPlan/getMinimumTaskProgressRateEqual", method = RequestMethod.POST)
    public Map<String, Object> getMinimumTaskProgressRateEqual(@RequestBody PlanShutNum planShutNum);

    @RequestMapping(value = "/api/outside/chaPlan/getMinimumTaskProgressRateEqualNew", method = RequestMethod.POST)
    public List<PassRade> getMinimumTaskProgressRateEqualNew(@RequestBody PlanShutNum planShutNum);

    @RequestMapping(value = "/api/outside/chaPlan/getTeacherRate", method = RequestMethod.POST)
    public List<PassRade> getTeacherRate(@RequestBody PlanShutNum planShutNum);

    @RequestMapping(value = "/api/outside/chaPlan/getTeacherRateDetail", method = RequestMethod.POST)
    public Page<PassRadeDetail> getTeacherRateDetail(@RequestBody PlanShutNum planShutNum);

    @RequestMapping(value = "/api/outside/chaPlan/getMinimumTaskProgressRateEqualDetailNew", method = RequestMethod.POST)
    public List<PassRadeDetail> getMinimumTaskProgressRateEqualDetailNew(@RequestBody PlanShutNum planShutNum);

    @RequestMapping(value = "/api/outside/chaPlan/getMinimumTaskProgressRateEqualDetail", method = RequestMethod.POST)
    public Map<String, Object> getMinimumTaskProgressRateEqualDetail(@RequestBody PlanShutNum planShutNum);

    @RequestMapping(value = "/api/outside/chaPlan/getMinimumTaskProgressRateNew", method = RequestMethod.POST)
    public ArrayList<Object> getMinimumTaskProgressRateNew(@RequestBody JSONObject planShutNum);

    //任务表 学习到的课次 数字列表显示
    @RequestMapping(value = "/api/outside/eduTask/getTaskNumber", method = RequestMethod.POST)
    public List<EduTask> getTaskNumber(@RequestBody EduTask eduTask);

    @RequestMapping(value = "/api/outside/eduTask/getTaskNew", method = RequestMethod.GET)
    public Map<String, Object> getTaskNew(@RequestParam(value = "yearPart") String yearPart,
                                          @RequestParam(value = "quarterNum") String quarterNum,
                                          @RequestParam(value = "yearClassId") String yearClassId,
                                          @RequestParam(value = "classTypeId") String classTypeId,
                                          @RequestParam(value = "courseVersionId") String courseVersionId);

    @RequestMapping(value = "/api/outside/perStudent/getStudentIdForClassType", method = RequestMethod.GET)
    public List<Long> getStudentIdForClassType(@RequestParam(value = "yearPart") Integer yearPart,
                                               @RequestParam(value = "quarterNum") Integer quarterNum,
                                               @RequestParam(value = "classTypeId") Long classTypeId);

    @RequestMapping(value = "/api/outside/perStudent/getStudentIdByClassType", method = RequestMethod.GET)
    public List<Long> getStudentIdByClassType(@RequestParam(value = "yearPart") String yearPart,
                                              @RequestParam(value = "quarterNum") String quarterNum,
                                              @RequestParam(value = "yearClassId") String yearClassId,
                                              @RequestParam(value = "classTypeId") String classTypeId);

    @RequestMapping(value = "/api/outside/perStudent/synchronousStudentIdForClassType", method = RequestMethod.POST)
    public List<Long> synchronousStudentIdForClassType(@RequestBody StudentClassType getStudentClassType);

    /**
     * 获取电脑管理 使用情况列表
     */
    @RequestMapping(value = "/api/outside/aiSitePc/useConditionList", method = RequestMethod.GET)
    public Map<String, Object> useConditionList(@RequestParam(value = "status") String status,// 电脑状态：1正常，2维修中，3报废
                                                @RequestParam(value = "useStatus") String useStatus,// 0空闲，1待使用，2使用中
                                                @RequestParam(value = "studentName") String studentName,
                                                @RequestParam(value = "schoolId") String schoolId,
                                                @RequestParam(value = "schoolSiteId") String schoolSiteId);

    /**
     * 获取校区场地
     */
    @RequestMapping(value = "/api/outside/aiSchoolSite", method = RequestMethod.GET)
    public List<SchoolQuarter> aiSchoolSiteList(@RequestParam(value = "yearPart") String yearPart,
                                                @RequestParam(value = "quarterNum") String quarterNum,
                                                @RequestParam(value = "schoolId") String schoolId);

    /**
     * 调整电脑使用情况
     */
    @RequestMapping(value = "/api/outside/aiSitePc/updateComputerUse", method = RequestMethod.POST)
    public String updateComputerUse(@RequestBody AiSitePc aiSitePc);

    /**
     * 获取修改原因
     * @param
     */
    @RequestMapping(value = "/api/outside/aiSitePcMaintain/getRepairReason", method = RequestMethod.GET)
    public Map<String, Object> getRepairReason(@RequestParam(value = "id") Long id);


    /**
     * 学员列表
     */
    @RequestMapping(value = "/api/outside/studentAccount/studentAccountList", method = RequestMethod.GET)
    public List<StudentAccount> studentAccountList(@RequestParam(value = "schoolId",defaultValue = "",required = false) String schoolId,
                                                   @RequestParam(value = "studentName",defaultValue = "",required = false) String studentName,
                                                   @RequestParam(value = "account",defaultValue = "",required = false) String account,
                                                   @RequestParam(value = "yearPart",defaultValue = "",required = false) String yearPart,
                                                   @RequestParam(value = "quarterNum",defaultValue = "",required = false) String quarterNum);

    /**
     * 键盘熟练度通关率列表
     */
    @RequestMapping(value = "/api/outside/chaPlan/getKeyboardPracticeList", method = RequestMethod.POST)
    public List<PassRade> getKeyboardPracticeList(@RequestBody PlanShutNum planShutNum);


    /**
     * 键盘熟练度详情
     */
    @RequestMapping(value = "/api/outside/chaPlan/getKeyboardPracticeDetails", method = RequestMethod.POST)
    public List<PassRadeDetail> getKeyboardPracticeDetails(@RequestBody PlanShutNum planShutNum);

}
